import http from '@/utils/http'

const BASE_URL = '/education/time-template'

export interface TimeTemplate {
  id: string
  name: string
  startTime: string
  endTime: string
}

export interface TimeTemplateResp extends TimeTemplate {
}

/** @desc 查询列表 */
export function getList() {
  return http.get<TimeTemplateResp[]>(`${BASE_URL}/list`)
}

/** @desc 创建 */
export function create(data: any) {
  return http.post(`${BASE_URL}/create`, data)
}

/** @desc 修改 */
export function update(data: any, id: string) {
  return http.post(`${BASE_URL}/update/${id}`, data)
}

/** @desc 删除 */
export function remove(id: string) {
  return http.post(`${BASE_URL}/delete/${id}`)
}

/** @desc 删除 */
export function detail(id: string) {
  return http.get(`${BASE_URL}/${id}`)
}
